package com.fxz.demo.controller;

import com.fxz.demo.service.IDemoService;
import com.fxz.mvcframework.annotations.FxzAutowired;
import com.fxz.mvcframework.annotations.FxzController;
import com.fxz.mvcframework.annotations.FxzRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Fxz
 * @version 1.0
 * @date 2021-08-20 15:28
 */
@FxzRequestMapping("/demo")
@FxzController
public class DemoController {

    @FxzAutowired
    private IDemoService iDemoService;

    /**
     * URL: /demo/query
     * @param request
     * @param response
     * @param name
     * @return
     */
    @FxzRequestMapping("/query")
    public String query(HttpServletRequest request, HttpServletResponse response, String name) {
        return iDemoService.get(name);
    }

}
